In the related art, a diaphragm pump is provided with a photoelectric sensor for detecting a rotational speed of an electric motor shaft and a photoelectric shielding sheet, in which, the photoelectric shielding sheet is integrally formed on an eccentric wheel or the electric motor shaft. This configuration makes structures of the eccentric wheel and the electric motor shaft excessively complicated, being not easy to process and manufacture, and during a process of high-speed rotation, as being unevenly stressed, a resulting fluttering phenomenon will occur to the eccentric wheel.